/*
注册全局组件
vue2: {install(Vue){}} => Vue的构造函数
vue3: {install(app){}} => app实例
*/
import Skeleton from './Skeleton'
import Slider from './Slider'
// 更多
import More from './More'
// 面包屑
import Bread from './Bread'
import BreadItem from './Bread/item.vue'
import City from './City'
// Sku信息
import Sku from './Sku'
// 数量加减
import Numbox from './Numbox'
// 按钮
import Button from './Button'
import CheckBox from './CheckBox'
const cps = [
  Skeleton,
  Slider,
  More,
  Bread,
  BreadItem,
  City,
  Sku,
  Numbox,
  Button,
  CheckBox
]
export default {
  install (app) {
    console.log('vue实例：', app)
    // 批量注册
    cps.forEach(cp => {
      app.component(cp.name, cp)
    })
  }
}
